#ifdef GL_ES
precision highp float; 
#endif
varying vec4 V_Color;
varying vec2 V_TexCoord;
uniform sampler2D U_MainTexture;
uniform vec4 U_offset;
void main()
{
	vec2 texcoord=V_TexCoord+U_offset.xy;
	texcoord.x=mod(texcoord.x,1.0);
	texcoord.x=max(texcoord.x,0.01);
	texcoord.x=min(texcoord.x,0.99);
	gl_FragColor = texture2D(U_MainTexture, texcoord)*V_Color;
}